import http from '../../utils/request'
//员工分页查询接口
export const getUserPageData =(params) =>{
    return http.get('/user',
        {params}).then(reponse =>{
        return reponse.data.userPassPage;
    }).catch(error => {
        console.error(error);
    });
}

//员工删除接口
export const delUser =(params) =>{
    var id = params.id;
    return http.post('/user/d/'+id).then(response =>{
        return response;
    })
}
//员工新增接口
export const addUser =(params) =>{
    return http.post('/user',params).then(response =>{
        return response;
    })
}
//员工查询接口
export const getUserListData =(params) =>{
    return http.get('/user/list',
        {params}).then(reponse =>{
        return reponse.data.userList;
    }).catch(error => {
        console.error(error);
    });
}